package com.example.demo.entity;

/**
 * @Author: yucsa
 * @Date: 2021/8/20 12:25
 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;

@Data
public class User extends Person implements Serializable {
    private String username;
    private String telephone;
    private String nickname;
    private Byte gender;
    private String address;
    private BigDecimal balance;
    private Byte isDelete;


    public User(String username,String password){
        this.username = username;
        this.password = password;
    }

    public User(){};

    public User(Long id, String username, String telephone, String password, Byte role, String nickname, Byte gender, String address, BigDecimal balance, Byte isDelete, String founder, Date foundTime, String updater, Date updateTime) {
        this.id = id;
        this.username = username;
        this.telephone = telephone;
        this.password = password;
        this.role = role;
        this.nickname = nickname;
        this.gender = gender;
        this.address = address;
        this.balance = balance;
        this.isDelete = isDelete;
        this.founder = founder;
        this.foundTime = foundTime;
        this.updater = updater;
        this.updateTime = updateTime;
    }

    @Override
    public Long getId() {
        return id;
    }

    public User setId(Long id) {
        this.id = id;
        return this;
    }

    public String getTelephone() {
        return telephone;
    }

    public User setTelephone(String telephone) {
        this.telephone = telephone;
        return this;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setGender(Byte gender) {
        this.gender = gender;
    }

    public Byte getIsDelete() {
        return isDelete;
    }

    public User setIsDelete(Byte isDelete) {
        this.isDelete = isDelete;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public User setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getNickname() {
        return nickname;
    }

    public User setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public Byte getGender() {
        return gender;
    }

    public User setGender(byte gender) {
        this.gender = gender;
        return this;
    }

    public String getAddress() {
        return address;
    }

    public User setAddress(String address) {
        this.address = address;
        return this;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public User setBalance(BigDecimal balance) {
        this.balance = balance;
        return this;
    }

}

